Skip to content

Enable Ruby JIT by default - #5464

Merged
kenhys merged 2 commits into
fluent:masterfrom
Watson1978:feat-enable-jit
Aug 10, 2026
Merged

Enable Ruby JIT by default#5464
kenhys merged 2 commits into
fluent:masterfrom
Watson1978:feat-enable-jit

Conversation

@Watson1978

@Watson1978 Watson1978 commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Which issue(s) this PR fixes:
Fixes #5284

What this PR does / why we need it:
Enable Ruby JIT by default.

Docs Changes:
fluent/fluentd-docs-gitbook#674

Release Note:

  • Enable Ruby JIT by default
    • The system configuration enable_jit now defaults to true.
    • JIT increases memory usage of each worker process. Set enable_jit false in the <system> section to restore the previous behavior.
    • This has no effect on Windows because YJIT is not supported there. Fluentd just logs Ruby JIT is not available on this Ruby at the info level.

@Watson1978 Watson1978 changed the title Feat enable jit Enable Ruby JIT by default Aug 7, 2026
Signed-off-by: Shizuo Fujita <fujita@clear-code.com>
Signed-off-by: Shizuo Fujita <fujita@clear-code.com>
@Watson1978

Watson1978 commented Aug 10, 2026

Copy link
Copy Markdown
Contributor Author

Environment

  • ruby 4.0.6 (2026-07-14 revision 03b6d3f889) +PRISM [x86_64-linux]
  • fluentd v1.19 master
  • 10 GB file to read using in_tail plugin

run rake benchmark:run:in_tail command in locally.

Process time

no JIT

       user     system      total        real
  27.484551   8.716998  36.201549 ( 33.172657)

JIT

       user     system      total        real
  21.463367   9.194959  30.658326 ( 27.716927)

Memory usage

chart

Result

~ no JIT JIT rate
process time [sec] 33.1726 27.7169 x0.8355
memory usage(max) [MiB] 98.5859 102.5937 x1.0407

When we enable JIT:

  • increase performance about 19.7%
  • increase memory usage about 4.1%

@Watson1978
Watson1978 marked this pull request as ready for review August 10, 2026 02:32
@Watson1978
Watson1978 requested a review from kenhys August 10, 2026 02:32
@kenhys
kenhys merged commit 29239b0 into fluent:master Aug 10, 2026
20 checks passed
@Watson1978
Watson1978 deleted the feat-enable-jit branch August 10, 2026 05:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature Request] Enable Ruby JIT by default in future releases

2 participants